package com.lb.sssq.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.lb.sssq.domain.Scattered_sssq;

@Service

public interface DepositService {

	/**
	 * 查询余额宝详情
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public String queryMoneyFundDetail(Map<String, String> map) throws Exception;
	
	/**
	 * 获取在投金额
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public String findAccountAmount(Map<String, String> map) throws Exception;

	/**
	 * 查询所有上架表产品信息
	 * @param map
	 * @return
	 */
	public List<Scattered_sssq> queryScatteredLoan(Map<String, Object> map);
	/**
	 * 根据(在售>预售>售罄 时间降序)获取1条上架活期标信息
	 * @param map
	 * @return
	 */
	public Map<String,Object> queryScatteredLoanInfo(Map<String, Object> map);
	/**
	 * 查询所有上架表产品信息总数
	 * @return
	 */
	public String queryScatteredLoanCount(Map<String, Object> map);
	/**
	 * 根据(在售>预售>售罄 时间降序)获取1条上架活期标信息总条数
	 * @param map
	 * @return
	 */
	public String queryScatteredLoanInfoCount(Map<String, Object> map);
	/**
	 * 查询余额宝交易记录
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public String queryMoneyFundFlow(Map<String, String> map) throws Exception;
	/**
	 * 查询余额宝历史收益列表
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public String queryIncomeStatementList(Map<String, Object> map) throws Exception;
	
	/**
	 * 转出接口
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public String updateInvestmentAmount(Map<String, Object> map) throws Exception;
	
	/**
	 * 查询当前在投债权及借贷人信息
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public String queryOrderCreditList(Map<String,String> map) throws Exception;
	
	/**
	 * 
	 * @Description: 查询我的账户详情信息
	 * @param map
	 * @return
	 * @throws Exception   
	 * @return String  
	 * @throws
	 * @author qibo
	 * @date 2015-10-10 下午7:15:39
	 */
	public String queryMyAccountDetail(Map<String,String> map) throws Exception;
	
	/**
	 * 获取余额宝产品的今日年化收益率
	 * @return
	 */
	public Map<String, Object> getExpectedRate(String finaceId) throws Exception;
	
	/**
	 * 通过资产部id获取标的id
	 * @return
	 */
	public String queryBidIdByFinaceId(String finaceId);
	
	/**
	 * 生成借款协议
	 * @return
	 */
	public void createAgreement(String userId,BigDecimal decBuyAmount, String bidId, String orderId);
	
	/**
	 * 查询订单映射表 标的对应投资金额
	 * @return
	 */
	public String queryInvestAmount(Map<String, String> map)throws Exception;

	/**
	 * 生成借款协议(传两台FTP服务器)
	 * @return
	 */
	public void createAgreement(String userId,BigDecimal decBuyAmount, String bidId, String orderId,String arrayStr,String investDateStr);
	
	public Map<String, Object> findCurrentRate(String userId) throws Exception;

	String getInvestYearAndMon(String orderId, String bidId) throws Exception;

}